package cn.tedu.logistics.dao;

import java.util.ArrayList;
import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import cn.tedu.logistics.bean.Goods;

//商品表对应的dao层
public interface GoodsDao extends BaseMapper<Goods>{

	@Select("select * from goods where type_name = "
			+ "(select goods_type from goods_type where goods_type_id=#{id} )")
	ArrayList<Goods> findGoodsByTypeId(Integer id);

	@Select("select goods_id from goods where type_name=#{type} ")
	List<String> findGoodsIdList(String type);

}
